home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / tinyterm / tt.h < prev   
C/C++ Source or Header  |  1995-11-16  |  3KB  |  92 lines

  1. #include <exec/memory.h>
  2. #include <exec/devices.h>
  3. #include <exec/libraries.h>
  4. #include <libraries/dosextens.h>
  5. #include <intuition/intuition.h>
  6. #include <devices/inputevent.h>
  7. #include <devices/serial.h>
  8. #include <devices/timer.h>
  9. #include <devices/keymap.h>
  10. #include <hardware/cia.h>
  11. #include "xproto.h"
  12. #include <functions.h>
  13. #include <pragmas.h>
  14. #include <string.h>
  15.  
  16. #define RAW 1
  17. #define COOKED 0
  18.  
  19. #define min(x,y) ((x) < (y) ? (x) : (y))
  20. #define max(x,y) ((x) > (y) ? (x) : (y))
  21. #define C2B(x) (((ULONG)(x)) >> 2)
  22. #define WriteOut(x) Write(Output(), x, strlen(x))
  23. #define ARGVAL() (*++(*argv) || (--argc && *++argv))
  24.  
  25. VOID *tt_fopen(char *, char *);
  26. VOID tt_fclose(VOID *);
  27. LONG tt_fread(char *, LONG, LONG, VOID *);
  28. LONG tt_fwrite(char *, LONG, LONG, VOID *);
  29. LONG tt_fseek(VOID *, LONG, LONG);
  30. LONG tt_finfo(char *, LONG);
  31. LONG tt_sread(char *, LONG, LONG);
  32. LONG tt_swrite(char *, LONG);
  33. LONG tt_sflush();
  34. VOID tt_update(struct XPR_UPDATE *);
  35. LONG tt_gets(char *, char *);
  36. LONG tt_chkabort();
  37.  
  38. #pragma regcall(tt_fopen(a0,a1))
  39. #pragma regcall(tt_fclose(a0))
  40. #pragma regcall(tt_fread(a0,d0,d1,a1))
  41. #pragma regcall(tt_fwrite(a0,d0,d1,a1))
  42. #pragma regcall(tt_fseek(a0,d0,d1))
  43. #pragma regcall(tt_finfo(a0,d0))
  44. #pragma regcall(tt_sread(a0,d0,d1))
  45. #pragma regcall(tt_swrite(a0,d0))
  46. #pragma regcall(tt_sflush())
  47. #pragma regcall(tt_update(a0))
  48. #pragma regcall(tt_chkabort())
  49. #pragma regcall(tt_gets(a0,a1))
  50.  
  51. long dectoint(char *str);
  52. char *inttodec(long num, char *buf, short width);
  53. char *strlwr(char *str);
  54. long SendPacket(struct MsgPort *port, struct MsgPort *replyport, long type, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6, long arg7);
  55. void QueueCon(void);
  56. short CheckCon(void);
  57. long QueueTimer(long micros);
  58. void AbortRequest(short *InProgress, struct IORequest *IOR);
  59. short FinishedIO(short *InProgress, struct IORequest *IOR);
  60. int QueueSerRead(char *buff, long length);
  61. long SerRead(char *buff, long length, long micros);
  62. void SerWrite(char *str, long n);
  63. void SerFlush(void);
  64. int CloseStuff(void);
  65. struct TextFont *SmartOpenFont(struct TextAttr *ta);
  66. int OpenStuff(void);
  67. void RawCon(void);
  68. void StdCon(void);
  69. void tt_update(struct XPR_UPDATE *x);
  70. long tt_gets(char *prompt, char *buffer);
  71. long tt_swrite(char *s, long n);
  72. long tt_sread(char *buff, long length, long micros);
  73. long tt_sflush(void);
  74. void *tt_fopen(char *s, char *t);
  75. void tt_fclose(void *fp);
  76. long tt_fread(char *buff, long size, long count, void *fp);
  77. long tt_fwrite(char *buff, long size, long count, void *fp);
  78. long tt_fseek(void *fp, long offset, long origin);
  79. long tt_chkabort(void);
  80. long tt_finfo(char *filename, long infotype);
  81. int xpr_setup(struct XPR_IO *IO);
  82. short DoKeys(short n);
  83. void CloseProtocol(void);
  84. char *InitProtocol(char *protocol);
  85. struct KeyMap *FindKeymap(char *name);
  86. struct TextFont *SetConFont(struct TextFont *Font);
  87. void SelectProtocol(void);
  88. void Transfer(short direction);
  89. void _wb_parse(void);
  90. void _abort(void);
  91. int main(short argc, char **argv);
  92.